package cn.chinasyq.photoquan.user.activity;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;

import cn.chinasyq.photoquan.R;
import cn.chinasyq.photoquan.user.fragment.HeadPortraitFragment;
import cn.chinasyq.photoquan.user.fragment.UserBasicInfoFragment;

/**
 * 编辑个人信息
 */
public class EditUserInfoActivity extends FragmentActivity implements
		OnClickListener {

	@SuppressWarnings("unused")
	private static final String TAG = EditUserInfoActivity.class.getName();

	private ImageButton ivBack;
	private TextView tvTitle = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		super.setContentView(R.layout.activity_edit_user_info);
		loadView(savedInstanceState);
	}
	
	@Override
	public void onResume() {
		super.onResume();
	}

	@Override
	public void onPause() {
		super.onPause();
	}

	/**
	 * 加载View
	 */
	private void loadView(Bundle savedInstanceState) {
		if( savedInstanceState!=null ){
			return;
		}
		FragmentManager fManager = getSupportFragmentManager();
		FragmentTransaction ft = fManager.beginTransaction();
		ft.add(R.id.llyt_container, new HeadPortraitFragment());
		ft.add(R.id.llyt_container, new UserBasicInfoFragment());
//		ft.add(R.id.llyt_container, new UserEmailFragment());
//		ft.add(R.id.llyt_container, new UserPlayedFragment());
//		ft.add(R.id.llyt_container, new PersonSignatureFragment());
		ft.commit();
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.ibtn_back:
			finish();
			break;
		default:
			break;
		}
	}
}
